class Dog(object):
    name = "3333"

    def __init__(self, name):
        self.name = name

    # @staticmethod     # 静态方法
    @classmethod    # 类方法只能访问类中变量，不能访问实例变量
    def eat(self):
        print("name is %s" % self.name)


a = Dog("liudehua")
a.eat()
